package cn.zl.GB28181.core;


import cn.yunbamboos.Model;
import com.alibaba.fastjson2.JSONObject;

/**
 * 摄像机同步状态
 */
public class SyncStatus implements Model {
    // 总数
    private int total;
    // 当前更新多少
    private int current;
    // 错误描述
    private String errorMsg;
    // 是否同步中
    private boolean sync;

    @Override
    public JSONObject encode() {
        JSONObject json = new JSONObject();
        json.put("total", total);
        json.put("current", current);
        json.put("error_msg", errorMsg);
        json.put("sync", sync);
        return json;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getCurrent() {
        return current;
    }

    public void setCurrent(int current) {
        this.current = current;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public boolean isSync() {
        return sync;
    }

    public void setSync(boolean sync) {
        this.sync = sync;
    }
}
